//
//  Log.swift
//  readtool
//
//  Created by WanJiading on 16/6/13.
//  Copyright © 2016年 DAD. All rights reserved.
//

import Foundation

public func DebugLog<T>(_ message: T, fileName: String = #file, methodName: String =  #function, lineNumber: Int = #line)
{
    #if DEBUG
        let str : String = (fileName as NSString).pathComponents.last!.replacingOccurrences(of: "swift", with: "")
        
        print("【Info】\(str)\(methodName)[\(lineNumber)]:\(message)")
    #endif
}

public func ExceptionLog<T>(_ message: T, fileName: String = #file, methodName: String =  #function, lineNumber: Int = #line)
{
	#if DEBUG
		let str : String = (fileName as NSString).pathComponents.last!.replacingOccurrences(of: "swift", with: "")
		
		print("【Exception】\(str)\(methodName)[\(lineNumber)]:\(message)")
	#endif
}

public func ErrorLog<T>(_ message: T, fileName: String = #file, methodName: String =  #function, lineNumber: Int = #line)
{
	#if DEBUG
		let str : String = (fileName as NSString).pathComponents.last!.replacingOccurrences(of: "swift", with: "")
		
		print("【Error】\(str)\(methodName)[\(lineNumber)]:\(message)")
	#endif
}

public func DebugLogFunc(_ fileName: String = #file, methodName: String =  #function, lineNumber: Int = #line)
{
	#if DEBUG
		let str : String = (fileName as NSString).pathComponents.last!.replacingOccurrences(of: "swift", with: "")
		
		print("\(str)\(methodName)[\(lineNumber)]")
	#endif
}
